<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping default-lazy="false">
  <class table="${entity.table}" name="${entity.namespace}.${prefixPackage}.${entity.nameCapital}">
    <comment>${entity.comment}</comment>
<#if entity.hasId><#t/>
	<#assign property = entity.idProperty><#t/>
    <id unsaved-value="null" name="${property.nameUncapital}" column="${property.columnName}" ${property.hbmType}>
      <meta inherit="true" attribute="field-description">${property.comment?xml}</meta>
<#if property.hasSequence><#t/>
      <generator class="sequence">
        <param name="sequence">${property.sequence}</param>
      </generator>
</#if><#t/>
    </id>
</#if><#t/>
<#list entity.properties as property><#t/>
<#if !property.isKey><#t/>
    <property name="${property.nameUncapital}" column="${property.columnName}"<#if property.notNull> not-null="true"</#if> ${property.hbmType}>
      <meta inherit="true" attribute="field-description">${property.comment?xml}</meta>
    </property>
</#if><#t/>
</#list><#t/>
  </class>
</hibernate-mapping>
